﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class CreateDistributor : System.Web.UI.Page
{
    public string UserName
    {
        get { return UserProfile2.UserName; }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        
    }
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (chkTerms.Checked)
        {
            if(UserProfile2.Save())
            {
                Ample.Helpers.AdminEmailUserRegistered(UserProfile2.UserName, UserProfile2.Email, this);
                ((Label) CreateUserWizard1.WizardSteps[1].FindControl("lblID")).Text = UserName;
                CreateUserWizard1.ActiveStepIndex++;   
            }
            else
            {
                chkTerms.Checked = false;
            }
        }

    }
}
